import request from '../utils/request'

export function getInfo(token) {
    return request({
        url: '/user/getInfo',
        method: 'get',
        params: { token }
    })
}

export function logout() {
    return request({
        url: 'https://api.rzico.com:8443/user/logout',
        method: 'post'
    })
}

//参数:{auth_code:code,uuid:识别号,mchId:'',pluginId}
export function getTokenByCode(params) {
    return request({
        url: 'https://api.rzico.com:8443/user/getTokenByCode',
        method: 'get',
        params: params
    })
}

export function sendMsg(params) {
    return request({
        url: 'https://api.rzico.com:8443/user/sendMsg',
        method: 'post',
        params: params
    })
}

export function msgLogin(params) {
    return request({
        url: 'https://api.rzico.com:8443/user/msgLogin',
        method: 'post',
        params: params
    })
}

export function register(params) {
    return request({
        url: '/user/tokenRegister',
        method: 'get',
        params: params
    })
}

export function update(params) {
    return request({
        url: '/user/update',
        method: 'post',
        params: params
    })
}

export function login(params) {
    return request({
        url:'https://api.rzico.com:8443/user/login',
        method:'post',
        params:params
    })
}


export function accessToken(params) {
    return request({
        url:'https://api.rzico.com:8443/user/access-token',
        method: 'get',
        params:params
    })
}
